#!/usr/bin/env python
# -*- coding: utf-8 -*-    
#mysqldb   
import sys
import model
import memcache  

reload(sys)
sys.setdefaultencoding('utf-8')

mc = memcache.Client(['127.0.0.1:12000'], debug=0)

key = "count"

def get_count():
	count = mc.get(key)  
	if not count:
		count = model.get_count()
    	mc.set(key,count,60*1) #存1分钟
	return count
